﻿// Decompiled with JetBrains decompiler
// Type: Commom.Util.Item
// Assembly: MT5Trade, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 8045A2CB-DBD6-41AD-8804-F98CAC1BDC8D
// Assembly location: C:\projects\trade\trade_tool\trade0812\MT5Trade.dll

using Newtonsoft.Json;
using System;

#nullable enable
namespace Commom.Util;

public class Item : IComparable<Item>
{
  public Item(string text, object value, int? sortId = null, string group = null, bool? disabled = null)
  {
    this.Text = text;
    this.Value = value;
    this.SortId = sortId;
    this.Group = group;
    this.Disabled = disabled;
  }

  [JsonProperty("text", NullValueHandling = NullValueHandling.Ignore)]
  public string Text { get; }

  [JsonProperty("value", NullValueHandling = NullValueHandling.Ignore)]
  public object Value { get; }

  [JsonProperty("sortId", NullValueHandling = NullValueHandling.Ignore)]
  public int? SortId { get; }

  [JsonProperty("group", NullValueHandling = NullValueHandling.Ignore)]
  public string Group { get; }

  [JsonProperty("disabled", NullValueHandling = NullValueHandling.Ignore)]
  public bool? Disabled { get; }

  public int CompareTo(Item other)
  {
    return string.Compare(this.Text, other.Text, StringComparison.CurrentCulture);
  }
}
